package com.gaber.extend;

/**
 * @author gaber
 * @date 2023/7/11 9:53:01
 * @description 公共类
 */
public class Animal {
    public String name;
    private int id;
    public Animal(String myName, int myid) {
        name = myName;
        id = myid;
    }

    public Animal() {

    }

    public void eat(){
        System.out.println(name+"正在吃");
    }
    public void sleep(){
        System.out.println(name+"正在睡");
    }
    public void introduction() {
        System.out.println("大家好！我是"         + id + "号" + name + ".");
    }
    public void move() {
        System.out.println("动物可以移动");
    }
}
